﻿<div class="list-group" id="divSettingMenu">
    <a href="/user/setting/account" class="list-group-item">个人账号</a>
</div>

<input type="hidden" id="hid_routeid" value='@ViewContext.RouteData.Values["id"]?.ToString()' />

<script>
    var hrid = $('#hid_routeid').val();
    if (hrid == "") {
        $('#divSettingMenu').children().first().addClass('active');
    } else {
        $('#divSettingMenu').children().each(function () {
            var hfs = this.href.split('/'), rid = hfs[hfs.length - 1];
            if (rid == hrid) {
                $(this).addClass('active');
                return false;
            }
        });
    }
</script>